// TextToSpeechManager.h
#ifndef TEXTTOSPEECHMANAGER_H
#define TEXTTOSPEECHMANAGER_H

#include <QObject>
#include <QTextToSpeech>
#include <QVector>
#include <QLocale>
#include <QVoice>

class TextToSpeechManager : public QObject
{
    Q_OBJECT

public:
    explicit TextToSpeechManager(QObject *parent = nullptr);
    ~TextToSpeechManager();

    void speak(const QString &text);
    void stop();
    void pause();
    void resume();
    void setRate(double rate);
    void setPitch(double pitch);
    void setVolume(double volume);
    void setVoice(const QVoice &voice);
    void setLanguage(const QLocale &locale);
    QVector<QVoice> availableVoices() const;
    QTextToSpeech::State state() const;

signals:
    void stateChanged(QTextToSpeech::State state);

private:
    QTextToSpeech *m_tts;
};

#endif // TEXTTOSPEECHMANAGER_H
